package com.student.mapper;

import com.student.bean.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Integer newid);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer newid);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    void insertRole(@Param(value = "userId") Integer userId,
                    @Param(value = "roleId") Integer roleId);

    Integer selectRoleId(@Param(value = "userId") Integer userId);

    String selectRole(@Param(value = "roleId") Integer roleId);

    User selectUserByLogname(@Param(value = "username") String username);

    //修改之前回显一下
   List<User> selectUser(@Param("loginname")String loginname);

   //修改数据
    boolean updatePerson1(@Param("nickname")String nickname,
                         @Param("signature")String signature,
                         @Param("sex")String sex,
                         @Param("age")Integer age,
                         @Param("phoneNumber")Integer phonenNumber,
                         @Param("area")String area,
                         @Param("constellationId")Integer constellationId,
                         @Param("email")String email,
                         @Param("loginname")String loginname);
}